public class swapPra {



    public static void swap(myValue1 vala,myValue2 valb){
        int temp=vala.a;
        vala.a=valb.b;
        valb.b=temp;

    }

    public static void main(String[] args) {

        myValue1 val1=new myValue1();
        myValue2 val2=new myValue2();

        System.out.println("交换前：a="+val1.a+"  "+"b="+val2.b);

        swap(val1,val2);

        System.out.println("==================");

        System.out.println("交换后：a="+val1.a+"  "+"b="+val2.b);

    }






}
